﻿using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Xml.Serialization;

/// <summary>
/// Summary description for CXHotel
/// </summary>
namespace CE.HotelEan
{
    public class CXHotel
    {
        public CXHotel(){}

        public HotelListResponse HotelListResponse { get; set; }
    }

    public class HotelListResponse : BaseResponse
    {
        public HotelListResponse(){}

        public CachedSupplierResponse cachedSupplierResponse { get; set; }
        public string cacheKey { get; set; }
        public string cacheLocation { get; set; }
        public HotelList HotelList { get; set; }
        public LocationInfos LocationInfos { get; set; }
        public bool moreResultsAvailable { get; set; }
        public bool moreResultsAvailableSpecified { get; set; }
        public int numberOfRoomsRequested { get; set; }
        public bool numberOfRoomsRequestedSpecified { get; set; }
    }
    public class CachedSupplierResponse
    {
        public CachedSupplierResponse(){}

        [XmlAttribute]
        public long cachedTime { get; set; }
        [XmlIgnore]
        public bool cachedTimeSpecified { get; set; }
        [XmlAttribute]
        public int cacheEntryExpiredNum { get; set; }
        [XmlIgnore]
        public bool cacheEntryExpiredNumSpecified { get; set; }
        [XmlAttribute]
        public int cacheEntryHitNum { get; set; }
        [XmlIgnore]
        public bool cacheEntryHitNumSpecified { get; set; }
        [XmlAttribute]
        public int cacheEntryMissNum { get; set; }
        [XmlIgnore]
        public bool cacheEntryMissNumSpecified { get; set; }
        [XmlAttribute]
        public long cacheRetrievalTime { get; set; }
        [XmlIgnore]
        public bool cacheRetrievalTimeSpecified { get; set; }
        [XmlAttribute]
        public long candidatePreptime { get; set; }
        [XmlIgnore]
        public bool candidatePreptimeSpecified { get; set; }
        [XmlAttribute]
        public bool extrapolatedCurrency { get; set; }
        [XmlIgnore]
        public bool extrapolatedCurrencySpecified { get; set; }
        [XmlAttribute]
        public bool extrapolatedLocale { get; set; }
        [XmlIgnore]
        public bool extrapolatedLocaleSpecified { get; set; }
        [XmlAttribute]
        public bool matchedCurrency { get; set; }
        [XmlIgnore]
        public bool matchedCurrencySpecified { get; set; }
        [XmlAttribute]
        public bool matchedLocale { get; set; }
        [XmlIgnore]
        public bool matchedLocaleSpecified { get; set; }
        [XmlAttribute]
        public long otherOverheadTime { get; set; }
        [XmlIgnore]
        public bool otherOverheadTimeSpecified { get; set; }
        [XmlAttribute]
        public SupplierCacheTolerance supplierCacheTolerance { get; set; }
        [XmlIgnore]
        public bool supplierCacheToleranceSpecified { get; set; }
        [XmlAttribute]
        public int supplierRequestNum { get; set; }
        [XmlIgnore]
        public bool supplierRequestNumSpecified { get; set; }
        [XmlAttribute]
        public int supplierResponseNum { get; set; }
        [XmlIgnore]
        public bool supplierResponseNumSpecified { get; set; }
        [XmlAttribute]
        public long supplierResponseTime { get; set; }
        [XmlIgnore]
        public bool supplierResponseTimeSpecified { get; set; }
        [XmlAttribute]
        public int tpidUsed { get; set; }
        [XmlIgnore]
        public bool tpidUsedSpecified { get; set; }
    }
    public enum SupplierCacheTolerance
    {
        NOT_SUPPORTED = 0,
        MIN = 1,
        MIN_ENHANCED = 2,
        MED = 3,
        MED_ENHANCED = 4,
        MAX = 5,
        MAX_ENHANCED = 6,
    }
    public class HotelList
    {
        public HotelList(){}

        [XmlAttribute]
        public int activePropertyCount { get; set; }
        [XmlIgnore]
        public bool activePropertyCountSpecified { get; set; }
        [XmlElement("HotelSummary")]
        public HotelSummary[] HotelSummary { get; set; }
        [XmlAttribute]
        public int size { get; set; }
    }
    public class HotelSummary
    {
        public HotelSummary(){}

        public string address1 { get; set; }
        public string address2 { get; set; }
        public string address3 { get; set; }
        public string airportCode { get; set; }
        public long amenityMask { get; set; }
        [XmlIgnore]
        public bool amenityMaskSpecified { get; set; }
        public string city { get; set; }
        public int confidenceRating { get; set; }
        [XmlIgnore]
        public bool confidenceRatingSpecified { get; set; }
        public string countryCode { get; set; }
        public string deepLink { get; set; }
        public float highRate { get; set; }
        [XmlIgnore]
        public bool highRateSpecified { get; set; }
        public long hotelId { get; set; }
        [XmlIgnore]
        public bool hotelIdSpecified { get; set; }
        public bool hotelInDestination { get; set; }
        [XmlIgnore]
        public bool hotelInDestinationSpecified { get; set; }
        public float hotelRating { get; set; }
        [XmlIgnore]
        public bool hotelRatingSpecified { get; set; }
        public float latitude { get; set; }
        [XmlIgnore]
        public bool latitudeSpecified { get; set; }
        public string locationDescription { get; set; }
        public float longitude { get; set; }
        [XmlIgnore]
        public bool longitudeSpecified { get; set; }
        public float lowRate { get; set; }
        [XmlIgnore]
        public bool lowRateSpecified { get; set; }
        public string name { get; set; }
        [XmlAttribute]
        public int order { get; set; }
        public string phoneNumber { get; set; }
        public string postalCode { get; set; }
        public PropertyCategory propertyCategory { get; set; }
        [XmlIgnore]
        public bool propertyCategorySpecified { get; set; }
        public float proximityDistance { get; set; }
        [XmlIgnore]
        public bool proximityDistanceSpecified { get; set; }
        public SearchRadiusUnitType proximityUnit { get; set; }
        [XmlIgnore]
        public bool proximityUnitSpecified { get; set; }
        public string rateCurrencyCode { get; set; }
        [XmlArrayItem(IsNullable = false)]
        public RoomRateDetailsList RoomRateDetailsList { get; set; }
        public string shortDescription { get; set; }
        public string stateProvinceCode { get; set; }
        public SupplierType supplierType { get; set; }
        [XmlIgnore]
        public bool supplierTypeSpecified { get; set; }
        public string thumbNailUrl { get; set; }
        public float tripAdvisorRating { get; set; }
        [XmlIgnore]
        public bool tripAdvisorRatingSpecified { get; set; }
        public string tripAdvisorRatingUrl { get; set; }
        public int tripAdvisorReviewCount { get; set; }
        [XmlIgnore]
        public bool tripAdvisorReviewCountSpecified { get; set; }
        [XmlAttribute]
        public string ubsScore { get; set; }
    }
    public class RoomRateDetailsList
    {
        public RoomRateDetailsList() { }

        public RoomRateDetails RoomRateDetails { get; set; }
    }
    public enum PropertyCategory
    {
        [XmlEnum("0")]
        Item0 = 0,
        [XmlEnum("1")]
        Item1 = 1,
        [XmlEnum("2")]
        Item2 = 2,
        [XmlEnum("3")]
        Item3 = 3,
        [XmlEnum("4")]
        Item4 = 4,
        [XmlEnum("5")]
        Item5 = 5,
        [XmlEnum("6")]
        Item6 = 6,
    }
    public enum SearchRadiusUnitType
    {
        MI = 0,
        KM = 1,
    }
    public enum SupplierType
    {
        E = 0,
        S = 1,
        W = 2,
        V = 3,
    }
    public class RoomRateDetails
    {
        public RoomRateDetails(){}

        public BedTypes BedTypes { get; set; }
        public int currentAllotment { get; set; }
        [XmlIgnore]
        public bool currentAllotmentSpecified { get; set; }
        public string expediaPropertyId { get; set; }
        public int maxRoomOccupancy { get; set; }
        [XmlIgnore]
        public bool maxRoomOccupancySpecified { get; set; }
        public int minGuestAge { get; set; }
        [XmlIgnore]
        public bool minGuestAgeSpecified { get; set; }
        public bool nonRefundable { get; set; }
        [XmlIgnore]
        public bool nonRefundableSpecified { get; set; }
        public string promoDescription { get; set; }
        public string promoDetailText { get; set; }
        public string promoId { get; set; }
        public bool propertyAvailable { get; set; }
        [XmlIgnore]
        public bool propertyAvailableSpecified { get; set; }
        public bool propertyRestricted { get; set; }
        [XmlIgnore]
        public bool propertyRestrictedSpecified { get; set; }
        public int quotedRoomOccupancy { get; set; }
        [XmlIgnore]
        public bool quotedRoomOccupancySpecified { get; set; }
        public string rateCode { get; set; }
        public HotelRateInfo RateInfo { get; set; }
        public RateInfos RateInfos { get; set; }
        public string rateKey { get; set; }
        public string rateType { get; set; }
        public string roomDescription { get; set; }
        public string roomTypeCode { get; set; }
        public string smokingPreferences { get; set; }
        public ValueAdds ValueAdds { get; set; }
    }
    public class BedTypes
    {
        public BedTypes(){}

        [XmlElement("BedType")]
        public bedType[] BedType { get; set; }
        [XmlAttribute]
        public int size { get; set; }
        [XmlIgnore]
        public bool sizeSpecified { get; set; }
    }
    public class bedType
    {
        public bedType(){}

        public string description { get; set; }
        [XmlAttribute]
        public int id { get; set; }
    }
    public class HotelRateInfo
    {
        public HotelRateInfo(){}

        public string cancellationPolicy { get; set; }
        [XmlArrayItem(IsNullable = false)]
        public CancelPolicyInfoList CancelPolicyInfoList { get; set; }
        public baseRateInfo ChargeableRateInfo { get; set; }
        [XmlElement("confirmationNumbers")]
        public string[] confirmationNumbers { get; set; }
        public baseRateInfo ConvertedRateInfo { get; set; }
        public int currentAllotment { get; set; }
        [XmlIgnore]
        public bool currentAllotmentSpecified { get; set; }
        public Deposit Deposit { get; set; }
        public bool depositRequired { get; set; }
        [XmlIgnore]
        public bool depositRequiredSpecified { get; set; }
        public bool guaranteeRequired { get; set; }
        [XmlIgnore]
        public bool guaranteeRequiredSpecified { get; set; }
        public HotelFees HotelFees { get; set; }
        public bool nonRefundable { get; set; }
        [XmlIgnore]
        public bool nonRefundableSpecified { get; set; }
        public bool online { get; set; }
        [XmlIgnore]
        public bool onlineSpecified { get; set; }
        [XmlAttribute]
        public string pkgSavingsAmount { get; set; }
        [XmlAttribute]
        public string pkgSavingsPercent { get; set; }
        [XmlAttribute]
        public bool priceBreakdown { get; set; }
        [XmlIgnore]
        public bool priceBreakdownSpecified { get; set; }
        [XmlAttribute]
        public bool promo { get; set; }
        public string promoDescription { get; set; }
        public string promoDetailText { get; set; }
        public string promoId { get; set; }
        [XmlIgnore]
        public bool promoSpecified { get; set; }
        public PromoType promoType { get; set; }
        [XmlIgnore]
        public bool promoTypeSpecified { get; set; }
        [XmlAttribute]
        public bool rateChange { get; set; }
        [XmlIgnore]
        public bool rateChangeSpecified { get; set; }
        public RatePlanType ratePlanType { get; set; }
        [XmlIgnore]
        public bool ratePlanTypeSpecified { get; set; }
        public RatePlanType rateType { get; set; }
        [XmlIgnore]
        public bool rateTypeSpecified { get; set; }
        [XmlArrayItem(IsNullable = false)]
        public Room RoomGroup { get; set; }
        public string taxRate { get; set; }
    }
    public class RateInfos
    {
        public RateInfos(){}

        [XmlElement("RateInfo")]
        public HotelRateInfo[] RateInfo { get; set; }
        [XmlAttribute]
        public int size { get; set; }
        [XmlIgnore]
        public bool sizeSpecified { get; set; }
    }
    public class CancelPolicyInfoList
    {
        public CancelPolicyInfoList() { }

        public CancelPolicyInfo[] CancelPolicyInfo { get; set; }
    }
    public class CancelPolicyInfo
    {
        public CancelPolicyInfo(){}

        public decimal amount { get; set; }
        [XmlIgnore]
        public bool amountSpecified { get; set; }
        public string cancelTime { get; set; }
        public string currencyCode { get; set; }
        public int nightCount { get; set; }
        public string percent { get; set; }
        public string startWindowHours { get; set; }
        public string timeZoneDescription { get; set; }
        public int versionId { get; set; }
    }
    public class baseRateInfo
    {
        public baseRateInfo(){}

        [XmlAttribute]
        public float averageBaseRate { get; set; }
        [XmlIgnore]
        public bool averageBaseRateSpecified { get; set; }
        [XmlAttribute]
        public float averageRate { get; set; }
        [XmlIgnore]
        public bool averageRateSpecified { get; set; }
        [XmlAttribute]
        public float commissionableUsdTotal { get; set; }
        [XmlIgnore]
        public bool commissionableUsdTotalSpecified { get; set; }
        [XmlAttribute]
        public string currencyCode { get; set; }
        public baseRateInfoDiscounts Discounts { get; set; }
        [XmlAttribute]
        public float discountTotal { get; set; }
        [XmlIgnore]
        public bool discountTotalSpecified { get; set; }
        [XmlAttribute]
        public decimal eanCompensationOffline { get; set; }
        [XmlIgnore]
        public bool eanCompensationOfflineSpecified { get; set; }
        [XmlAttribute]
        public decimal eanCompensationOnline { get; set; }
        [XmlIgnore]
        public bool eanCompensationOnlineSpecified { get; set; }
        [XmlAttribute]
        public decimal grossProfitOffline { get; set; }
        [XmlIgnore]
        public bool grossProfitOfflineSpecified { get; set; }
        [XmlAttribute]
        public decimal grossProfitOnline { get; set; }
        [XmlIgnore]
        public bool grossProfitOnlineSpecified { get; set; }
        [XmlAttribute]
        public float maxNightlyRate { get; set; }
        [XmlIgnore]
        public bool maxNightlyRateSpecified { get; set; }
        public baseRateInfoNightlyRatesPerRoom NightlyRatesPerRoom { get; set; }
        [XmlAttribute]
        public float nightlyRateTotal { get; set; }
        [XmlIgnore]
        public bool nightlyRateTotalSpecified { get; set; }
        public string promoDescription { get; set; }
        public baseRateInfoSurcharges Surcharges { get; set; }
        [XmlAttribute]
        public float surchargeTotal { get; set; }
        [XmlIgnore]
        public bool surchargeTotalSpecified { get; set; }
        [XmlAttribute]
        public float total { get; set; }
        [XmlIgnore]
        public bool totalSpecified { get; set; }
    }
    public class baseRateInfoDiscounts : listWithSizeAttribute
    {
        public baseRateInfoDiscounts(){}

        [XmlElement("Discount")]
        public Discount[] Discount { get; set; }
    }
    public class Discount
    {
        public Discount(){}

        [XmlAttribute]
        public float amount { get; set; }
        [XmlIgnore]
        public bool amountSpecified { get; set; }
        [XmlAttribute]
        public DiscountType type { get; set; }
        [XmlIgnore]
        public bool typeSpecified { get; set; }
    }
    public enum DiscountType
    {
        Unknown = 0,
        CouponDiscount = 1,
    }
    public class baseRateInfoNightlyRatesPerRoom : listWithSizeAttribute
    {
        public baseRateInfoNightlyRatesPerRoom(){}

        [XmlElement("NightlyRate")]
        public NightlyRate[] NightlyRate { get; set; }
    }
    public class listWithSizeAttribute
    {
        public listWithSizeAttribute(){}

        [XmlAttribute]
        public int size { get; set; }
    }
    public class NightlyRate
    {
        public NightlyRate(){}

        [XmlAttribute]
        public float baseRate { get; set; }
        [XmlIgnore]
        public bool baseRateSpecified { get; set; }
        [XmlAttribute]
        public bool promo { get; set; }
        [XmlIgnore]
        public bool promoSpecified { get; set; }
        [XmlAttribute]
        public float rate { get; set; }
        [XmlIgnore]
        public bool rateSpecified { get; set; }
    }
    public class baseRateInfoSurcharges : listWithSizeAttribute
    {
        public baseRateInfoSurcharges(){}

        [XmlElement("Surcharge")]
        public Surcharge[] Surcharge { get; set; }
    }
    public class Surcharge
    {
        public Surcharge(){}

        [XmlAttribute]
        public float amount { get; set; }
        [XmlIgnore]
        public bool amountSpecified { get; set; }
        [XmlAttribute]
        public SurchargeType type { get; set; }
        [XmlIgnore]
        public bool typeSpecified { get; set; }
    }
    public enum SurchargeType
    {
        Unknown = 0,
        Tax = 1,
        ServiceFee = 2,
        ExtraPersonFee = 3,
        SalesTax = 4,
        HotelOccupancyTax = 5,
        TaxAndServiceFee = 6,
    }
    public class Deposit
    {
        public Deposit(){}

        [XmlAttribute]
        public decimal amount { get; set; }
        [XmlIgnore]
        public bool amountSpecified { get; set; }
    }
    public class HotelFees
    {
        public HotelFees(){}

        [XmlElement("HotelFee")]
        public HotelFee[] HotelFee { get; set; }
        [XmlAttribute]
        public int size { get; set; }
        [XmlIgnore]
        public bool sizeSpecified { get; set; }
    }
    public class HotelFee
    {
        public HotelFee(){}

        [XmlAttribute]
        public decimal amount { get; set; }
        [XmlIgnore]
        public bool amountSpecified { get; set; }
        [XmlAttribute]
        public string description { get; set; }
        public HotelFeeBreakdown HotelFeeBreakdown { get; set; }
    }
    public class HotelFeeBreakdown
    {
        public HotelFeeBreakdown(){}

        [XmlAttribute]
        public string frequency { get; set; }
        [XmlAttribute]
        public string unit { get; set; }
    }
    public enum PromoType
    {
        Standard = 0,
        Mobile = 1,
    }
    public enum RatePlanType
    {
        MerchantStandard = 0,
        MerchantPackage = 1,
        MerchantCorporate = 2,
        DirectAgency = 3,
    }
    public class Room
    {
        public Room(){}

        public string bedTypeDescription { get; set; }
        public string bedTypeId { get; set; }
        public float chargeableRate { get; set; }
        [XmlIgnore]
        public bool chargeableRateSpecified { get; set; }
        [XmlElement("childAges")]
        public int[] childAges { get; set; }
        public string firstName { get; set; }
        public string lastName { get; set; }
        public int numberOfAdults { get; set; }
        public int numberOfBeds { get; set; }
        [XmlIgnore]
        public bool numberOfBedsSpecified { get; set; }
        public int numberOfChildren { get; set; }
        [XmlIgnore]
        public bool numberOfChildrenSpecified { get; set; }
        public string rateCode { get; set; }
        public string rateKey { get; set; }
        public string roomDescription { get; set; }
        public string roomTypeCode { get; set; }
        public SmokingPreference smokingPreference { get; set; }
        [XmlIgnore]
        public bool smokingPreferenceSpecified { get; set; }
    }
    public enum SmokingPreference
    {
        S = 0,
        NS = 1,
        E = 2,
    }
    public class ValueAdds
    {
        public ValueAdds(){}

        [XmlAttribute]
        public int size { get; set; }
        [XmlIgnore]
        public bool sizeSpecified { get; set; }
        [XmlElement("ValueAdd")]
        public valueAdd[] ValueAdd { get; set; }
    }
    public class valueAdd
    {
        public valueAdd(){}

        public string description { get; set; }
        [XmlAttribute]
        public int id { get; set; }
    }
}
